import json,urllib.request

def send_push(sender, subject, body, token = 'iJ7XciHt'):
  try:
    data = {
        "subject": subject,
        "body": body,
        "from": sender,
        "token": token,
        "options": {
          'vibrate': 'Default',
          'sound': 'and_a_happy_ny',
          'notify': 'Immediate'
        }
    } 
  
    params = json.dumps(data).encode("utf8")
    req = urllib.request.Request("https://api.teamcopy.com/msg", data=params, headers={"Content-Type": "application/json"})
    response = urllib.request.urlopen(req)
    return True
  except:
    print('Push notification send failed! ')
    return False
